<%-- 
    Document   : signin
    Created on : Jun 16, 2011, 9:53:57 PM
    Author     : Hany
--%>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Diminishing   by Free CSS Templates</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

<script type="text/JavaScript" language="JavaScript">
function validate()
{	
        var username = document.lab7.username.value;
	if(username=="")
	{
		document.getElementById("Ustatus").innerHTML = "Invalid username/password!";
		document.lab7.username.focus();
		return false;
	}
        var password = document.lab7.password.value;
	if(password=="")
	{
		document.getElementById("Ustatus").innerHTML = "Invalid username/password!";
		document.lab7.password.focus();
		return false;
	}
        
        var url = "checkSignin.jsp?username="+username+"&password="+password;
        var check = new XMLHttpRequest();
        check.open("GET", url, false);
        check.send(null);
        var res = check.responseText;
        if(res.search("TRUE") < 0){
            document.getElementById("Ustatus").innerHTML = "Invalid username/password!";
            return false;
        }
        else{
            return true;
        }
	
}



</script>

</head>
<body>
<div id="wrapper">
	<div id="menu">
		<ul>
			<li><span><a href="index.jsp">Home</a></span></li>
			<li class="current_page_item" ><a href="signup.jsp">Sign in</a></li>
			<li><a href="update.jsp">Update Profile</a></li>
			<li><a href="intro.jsp">About</a></li>
			<li><a href="reserve.jsp">Reserve Car</a></li>
			<li><a href="contact.jsp">Contact</a></li>
		</ul>
	</div>
	<!-- end #menu -->
	<div id="header">
		<div id="logo">
			<h1><a href="#">Rent A Car</a></h1>
		</div>
		<div id="search">
			<form method="get" action="">
				<fieldset>
					<input type="text" name="s" id="search-text" size="15" value="enter keywords here..." />
					<input type="submit" id="search-submit" value="GO" />
				</fieldset>
			</form>
		</div>
	</div>
	<div id="splash">&nbsp;</div>
	<!-- end #header -->
	<div id="page">
		<div id="page-bgtop">
			<div id="page-bgbtm">
				<div id="content">
                                    <%! String msg; %>
                                    <%
                                            Object message = session.getAttribute("msg");
                                            if(message != null){
                                                msg = message.toString();
                                                session.setAttribute("msg", "");
                                            }
                                                
                                            else
                                                msg = "";
                                     %>
                                     <h1>
                                         <%= msg %>
                                     </h1> 
                                    <h2>Sign In</h2>
<form name="lab7"  action="controller" onSubmit="return validate()">
<input type="hidden" name="action" value="SignIn">
<input type="hidden" name="hide" value="">
    
<table>
    <tr>
	<td><hr/></td>
	
    </tr>

<tr>
	<td align="right"><font face="verdana,arial" size=-1>username:</td>
	<td><input type="text" name="username"></td>
</tr>


<tr>
	<td align="right"><font face="verdana,arial" size=-1>password:</td>
	<td><input type="password" name="password"></td>
</tr>


<tr>
		<td align="right"></td>
                <td><input type="submit" value="SignIn" name="action"></td>
	</tr>

        <tr><td></td><td>
                
                <div name="Ustatus" id="Ustatus" style="color:red"/>
            </td></tr>


</table>
</form>
                                    
                                    <h3>If you are a new user</h3>
                                    <p><a href="signup.jsp">click here</a></p>
				</div>
				<!-- end #content -->
				<div id="sidebar">
					<ul>
						<li>
							<h2>Solution of pollution</h2>
							<p>Pollution is a big problem of today whether it is air or noise. Environmentalists embrace hybrid cars as a solution to today's pollution problems.</p>
						</li>
						<li>
							<h2>Branches</h2>
							<ul>
								<li><a href="contact.jsp">Lahore Branch</a></li>
								<li><a href="karachi.jsp">Karachi Branch</a></li>
								<li><a href="isl.jsp">Islamabad Branch</a></li>
								<li><a href="faisal.jsp">Faisalabad Branch</a></li>
								<li><a href="rawal.jsp">Rawalpindi Branch</a></li>
								
							</ul>
						</li>
						<li>
							<h2>Menu</h2>
							<ul>
								<li><a href="hybrid.jsp">Hybrid Cars</a></li>
								<li><a href="addcar.jsp">Add Cars</a></li>
								<li><a href="delCars.jsp">Delete Cars</a></li>
								<li><a href="freeCars.jsp">Make Car Reserved free</a></li>
								<li><a href="#">Beautiful Photos</a></li>
							</ul>
						</li>
						
					</ul>
				</div>
				<!-- end #sidebar -->
				<div style="clear: both;">&nbsp;</div>
			</div>
		</div>
	</div>
	<!-- end #page -->
</div>
<div id="footer-wrapper">
	<div id="three-columns">
		<div id="column1">
			<h2>Branches</h2>
			<ul>
				<li><a href="contact.jsp">Lahore Branch</a></li>
				<li><a href="karachi.jsp">Karachi Branch</a></li>
				<li><a href="isl.jsp">Islamabad Branch</a></li>
				<li><a href="faisal.jsp">Faisalabad Branch</a></li>
				<li><a href="rawal.jsp">Rawalpindi Branch</a></li>
				
			</ul>
		</div>
		<div id="column2">
			<h2>Menu</h2>
			<ul>
				<li><a href="hybrid.jsp">Hybrid Cars</a></li>
				<li><a href="addcar.jsp">Add Cars</a></li>
				<li><a href="delCars.jsp">Delete Cars</a></li>
				<li><a href="freeCars.jsp">Make Car Reserved free</a></li>
				<li><a href="#">Beautiful Photos</a></li>
			</ul>
		</div>
		
	</div>
	<div id="footer">
		<p>Copyright (c) 2011 Sitename.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/"> CSS Templates</a>.</p>
	</div>
	<!-- end #footer -->
</div>
</body>
</html>
